<template>
    <div class='priceList'>
        <el-dialog
            title="审核记录"
            :visible.sync="dialogVisible"
            width="30%"
            class='record'
            :close-on-click-modal='false'
            :before-close="handleClose">
            <ul>
                <li v-for='(item,index) in auditRecord' :key='index'>
                    <p>{{item.time | parseTime('{y}-{m}-{d} {h}:{i}')}}</p>
                    <h3>{{getStatus(item)}}</h3>
                </li>
            </ul>
        </el-dialog>    
    </div>
</template>


<script>
import { parseTime } from '@/utils';
export default {
    name:'examine',
    data(){
        return {
             dialogVisible:false,
             auditRecord:[]
        }
    },
    methods:{
        openPrice(item){
            if(item.length > 0){
                this.dialogVisible = true;
                this.auditRecord = item.reverse();
            }
        },
        getStatus(item){
            if(item.success){
                return '审核成功';
            }else{
                return '审核失败:'+item.failedReason;
            }
        },
        handleClose(done){
            done();
        },
    }
}
</script>


<style lang="less" scoped>
.priceList{
    .record{
        ul{
            li{
                margin: 1rem 0 0 0;
                p{
                    color: #c0c0c0;
                    font-size: 17px;
                    margin: 0;
                }
                h3{
                    margin: .5rem 0 0 0;
                    font-weight: 400;
                    font-size: 22px;
                    color: rgba(16, 16, 16, 1);
                }
            }
            li:first-child{
                margin: 0;
            }
        }
    }
}
</style>
